import request from '@/utils/request'

// 获取设计师列表
export function getDesignerList(params) {
  return request({
    url: '/api/back/designer/list',
    method: 'get',
    params
  })
}

// 获取设计师申请列表
export function getDesignerApply(params) {
  return request({
    url: '/api/back/designer/apply/list',
    method: 'get',
    params
  })
}

// 获取设计师作品列表
export function getDesignerWorksList(params) {
  return request({
    url: '/api/back/designer/product/list?designer_id=' + params,
    method: 'get'
  })
}

// 编辑设计师资料
export function editDesignerVal(data) {
  return request({
    url: '/api/back/designer/modify',
    method: 'post',
    data
  })
}

// 获取设计师数据
export function getDesignerConfig(params) {
  return request({
    url: '/api/front/designer/config',
    method: 'get'
  })
}

// 同意申请
export function agreeDesigner(data) {
  return request({
    url: '/api/back/designer/apply/pass',
    method: 'post',
    data
  })
}


// 设计师列表排序
export function sortDesigner(data) {
  return request({
    url: '/api/back/designer/sort',
    method: 'post',
    data
  })
}

// 禁用启用设计师
export function disableDesigner(data) {
  return request({
    url: '/api/back/designer/expire',
    method: 'post',
    data
  })
}

// 添加设计师
export function addDesigner(data) {
  return request({
    url: '/api/back/designer/add',
    method: 'post',
    data
  })
}

// 编辑设计师作品
export function editDesignerWorks(data) {
  return request({
    url: '/api/back/designer/product/update',
    method: 'post',
    data
  })
}

// 获取设计师积分记录
export function getDesignerIntegral(params) {
  return request({
    url: '/api/back/designer/score/record',
    method: 'get',
    params
  })
}

// 获取设计师预约记录
export function getReverseList(params) {
  return request({
    url: '/api/back/designer/appointment/list',
    method: 'get',
    params
  })
}

// 获取设计师入驻订单
export function getDesignerOrder(params) {
  return request({
    url: '/api/back/designer/apply/order',
    method: 'get',
    params
  })
}

// 获取车牌列表
export function getLicenseList(params) {
  return request({
    url: '/api/back/designer/park/ticket',
    method: 'get',
    params
  })
}

// 拒绝申请
export function refuseDesigner(data) {
  return request({
    url: '/api/back/designer/apply/reject',
    method: 'post',
    data
  })
}

// 删除设计师（已拒绝）
export function delDesigner(data) {
  return request({
    url: '/api/back/designer/apply/delete',
    method: 'post',
    data
  })
}

export function editPoster(img) {
  return request({
    url: '/api/back/designer/poster',
    method: 'post',
    params: { img }
  })
}
export function getPosterDetail() {
  return request({
    url: '/api/back/designer/poster',
    method: 'get'
  })
}

// 修改车牌号
export function uploadTicket(data) {
  return request({
    url: '/api/back/designer/park/ticket',
    method: 'post',
    data
  })
}

// 获取操作记录数据
export function getOperateList(params) {
  return request({
    url: '/api/back/admin/operations',
    method: 'get',
    params
  })
}

// 获取操作人数据
export function getOperator(params) {
  return request({
    url: '/api/back/account/accountList',
    method: 'get',
    params
  })
}
